-
Notifications
You must be signed in to change notification settings - Fork 1
chore: align plugin against enext branch #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: align plugin against enext branch #5
Conversation
Reviewer's GuideAligns all module imports, logging namespaces, plugin metadata, migration references, and log action types from pretix.* to eventyay.* to conform with the enext eventyay module structure. Entity relationship diagram for updated ReferencedPayPalObject modelerDiagram
ReferencedPayPalObject {
string reference
FK Order order
FK OrderPayment payment
}
Order ||--o{ ReferencedPayPalObject : "has"
OrderPayment ||--o{ ReferencedPayPalObject : "has"
Class diagram for updated PaypalPluginApp and plugin metaclassDiagram
class PaypalPluginApp {
name : str = "eventyay_paypal"
verbose_name : str = _("PayPal")
}
class EventyayPluginMeta {
name : str = _("PayPal")
author : str = "eventyay"
version : str = __version__
}
PaypalPluginApp <|-- EventyayPluginMeta
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes - here's some feedback:
- Ensure that the migration dependency change from 'pretixbase' to 'base' does not disrupt the existing migration graph or require a data migration for existing databases.
- Double-check that updating the logger names to 'eventyay.plugins.eventyay_paypal' matches your logging configuration so no log entries are dropped.
- Verify that renaming the inner plugin class from PretixPluginMeta to EventyayPluginMeta is still recognized by your plugin loader and won’t break plugin discovery.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Ensure that the migration dependency change from 'pretixbase' to 'base' does not disrupt the existing migration graph or require a data migration for existing databases.
- Double-check that updating the logger names to 'eventyay.plugins.eventyay_paypal' matches your logging configuration so no log entries are dropped.
- Verify that renaming the inner plugin class from PretixPluginMeta to EventyayPluginMeta is still recognized by your plugin loader and won’t break plugin discovery.
## Individual Comments
### Comment 1
<location> `eventyay_paypal/apps.py:8-9` </location>
<code_context>
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
from . import __version__
try:
from eventyay.base.plugins import PluginConfig
except ImportError:
raise RuntimeError("Python package 'paypal' is not installed.")
</code_context>
<issue_to_address>
**suggestion (code-quality):** Explicitly raise from a previous error ([`raise-from-previous-error`](https://docs.sourcery.ai/Reference/Default-Rules/suggestions/raise-from-previous-error/))
```suggestion
except ImportError as e:
raise RuntimeError("Python package 'paypal' is not installed.") from e
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make this PR against the enext branch.
The PR is made against enext branch only. |
|
I think you misunderstand. https://github.com/fossasia/eventyay-tickets-paypal/tree/enext here in this repo. |
c2318fd to
a4bc304
Compare
|
@hongquan could you please review this PR. |
eventyay_paypal/payment.py
Outdated
| from .utils import safe_get | ||
|
|
||
| logger = logging.getLogger("pretix.plugins.eventyay_paypal") | ||
| logger = logging.getLogger("eventyay.plugins.eventyay_paypal") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace all logging.getLogger('xxx') to logging.getLogger(__name__)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'PluginConfig' is not used anywhere in app.py, so i remove try catch code and import statement too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request migrates the eventyay_paypal plugin from the pretix framework to the eventyay framework. The changes involve updating all import statements, logger names, action type identifiers, and database model references to replace "pretix" with "eventyay" throughout the codebase.
Key changes:
- Updated all import statements from
pretix.*toeventyay.* - Renamed logger identifiers from "pretix.plugins.eventyay_paypal" to "eventyay.plugins.eventyay_paypal"
- Changed action type strings used in logging and signal handlers from "pretix." to "eventyay."
- Updated Django model ForeignKey references from 'pretixbase.' to 'base.'
- Consolidated database migrations and renamed plugin metadata class from
PretixPluginMetatoEventyayPluginMeta
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| eventyay_paypal/views.py | Updated imports from pretix to eventyay modules and changed logger/action type identifiers |
| eventyay_paypal/urls.py | Updated import of event_url from pretix.multidomain to eventyay.multidomain |
| eventyay_paypal/signals.py | Updated imports and all action type string identifiers used in signal handlers |
| eventyay_paypal/paypal_rest.py | Changed logger identifier to use eventyay namespace |
| eventyay_paypal/payment.py | Updated all imports and logger/action type identifiers throughout the payment provider class |
| eventyay_paypal/models.py | Changed ForeignKey references from 'pretixbase' to 'base' for database models |
| eventyay_paypal/migrations/0002_initial.py | Removed this migration file entirely (consolidated into 0001) |
| eventyay_paypal/migrations/0001_initial.py | Updated to consolidate migration, changed dependency from 'pretixbase' to 'base', and updated field types |
| eventyay_paypal/apps.py | Updated import and renamed PretixPluginMeta class to EventyayPluginMeta |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
eventyay_paypal/apps.py
Outdated
|
|
||
| try: | ||
| from pretix.base.plugins import PluginConfig | ||
| from eventyay.base.plugins import PluginConfig |
Copilot
AI
Oct 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'PluginConfig' is not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
a4bc304 to
1765e5b
Compare
This PR is a part of fossasia/eventyay#1030
Summary by Sourcery
Align PayPal plugin references with the Eventyay namespace by replacing pretix imports, log identifiers, and metadata to use eventyay equivalents
Enhancements: